/**
 * Mobile Context Monitor Styles
 * TypeScript Version
 */

/* 主容器样式 */
#mobile_context_settings {
  margin: 10px 0;
}

#mobile_context_settings .inline-drawer {
  border: 1px solid var(--SmartThemeBlurTintColor, #333);
  border-radius: 8px;
  background: var(--SmartThemeBackgroundColor, #1a1a1a);
}

#mobile_context_settings .inline-drawer-header {
  background: var(--SmartThemeHeaderColor, #2a2a2a);
  color: var(--SmartThemeBodyColor, #fff);
  padding: 12px 16px;
  border-radius: 8px 8px 0 0;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#mobile_context_settings .inline-drawer-header:hover {
  background: var(--SmartThemeHeaderHoverColor, #3a3a3a);
}

#mobile_context_settings .inline-drawer-content {
  padding: 16px;
  background: var(--SmartThemeContentColor, #1e1e1e);
  border-radius: 0 0 8px 8px;
}

/* 表单控件样式 */
#mobile_context_settings .flex-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#mobile_context_settings .checkbox_label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--SmartThemeBodyColor, #fff);
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

#mobile_context_settings .checkbox_label:hover {
  background: var(--SmartThemeHoverColor, rgba(255, 255, 255, 0.1));
}

#mobile_context_settings input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--SmartThemeAccentColor, #4CAF50);
}

#mobile_context_settings select,
#mobile_context_settings input[type="number"] {
  background: var(--SmartThemeInputColor, #2a2a2a);
  color: var(--SmartThemeBodyColor, #fff);
  border: 1px solid var(--SmartThemeBorderColor, #444);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

#mobile_context_settings select:focus,
#mobile_context_settings input[type="number"]:focus {
  outline: none;
  border-color: var(--SmartThemeAccentColor, #4CAF50);
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* 按钮样式 */
#mobile_context_settings .menu_button {
  background: linear-gradient(135deg, var(--SmartThemeAccentColor, #4CAF50), var(--SmartThemeAccentColorDark, #45a049));
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 4px 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#mobile_context_settings .menu_button:hover {
  background: linear-gradient(135deg, var(--SmartThemeAccentColorDark, #45a049), var(--SmartThemeAccentColor, #4CAF50));
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#mobile_context_settings .menu_button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 特殊按钮样式 */
#mobile_context_compile_btn {
  background: linear-gradient(135deg, #2196F3, #1976D2) !important;
}

#mobile_context_compile_btn:hover {
  background: linear-gradient(135deg, #1976D2, #2196F3) !important;
}

#mobile_context_clear_btn {
  background: linear-gradient(135deg, #FF9800, #F57C00) !important;
}

#mobile_context_clear_btn:hover {
  background: linear-gradient(135deg, #F57C00, #FF9800) !important;
}

#mobile_context_reload_btn {
  background: linear-gradient(135deg, #9C27B0, #7B1FA2) !important;
}

#mobile_context_reload_btn:hover {
  background: linear-gradient(135deg, #7B1FA2, #9C27B0) !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  #mobile_context_settings .flex-container {
    gap: 8px;
  }
  
  #mobile_context_settings .menu_button {
    width: 100%;
    margin: 2px 0;
  }
  
  #mobile_context_settings .inline-drawer-content {
    padding: 12px;
  }
}

/* 深色主题适配 */
@media (prefers-color-scheme: dark) {
  #mobile_context_settings {
    --SmartThemeBackgroundColor: #1a1a1a;
    --SmartThemeHeaderColor: #2a2a2a;
    --SmartThemeContentColor: #1e1e1e;
    --SmartThemeBodyColor: #fff;
    --SmartThemeBorderColor: #444;
    --SmartThemeInputColor: #2a2a2a;
    --SmartThemeHoverColor: rgba(255, 255, 255, 0.1);
    --SmartThemeAccentColor: #4CAF50;
    --SmartThemeAccentColorDark: #45a049;
  }
}

/* 亮色主题适配 */
@media (prefers-color-scheme: light) {
  #mobile_context_settings {
    --SmartThemeBackgroundColor: #ffffff;
    --SmartThemeHeaderColor: #f5f5f5;
    --SmartThemeContentColor: #fafafa;
    --SmartThemeBodyColor: #333;
    --SmartThemeBorderColor: #ddd;
    --SmartThemeInputColor: #ffffff;
    --SmartThemeHoverColor: rgba(0, 0, 0, 0.05);
    --SmartThemeAccentColor: #2196F3;
    --SmartThemeAccentColorDark: #1976D2;
  }
}

/* 动画效果 */
#mobile_context_settings .inline-drawer-content {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* TypeScript 特定样式 */
.typescript-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #3178C6, #235a97);
  color: white;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.typescript-indicator::before {
  content: "TS";
  font-weight: 700;
}

/* 状态指示器 */
.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-indicator.running {
  background: #4CAF50;
  animation: pulse 2s infinite;
}

.status-indicator.stopped {
  background: #f44336;
}

@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
} 